#include "../include/head.h"
int exitPipe[2];
void sig_handler(int signum){
    printf("signum = %d\n",signum);
    write(exitPipe[1],"1",1);
}
int main(int argc, char *argv[]){                                  

    // 建立用于父子进程通信的管道
    pipe(exitPipe);
    // 用于关闭的父进程
    if(fork()){
        close(exitPipe[0]);
        signal(SIGUSR1,sig_handler);
        wait(NULL);
        printf("aready close-----------------------------------------------------------\n");
        exit(0);
    }

    // 子进程
    close(exitPipe[1]);
    // 读取配置文件
    char ip[20];
    int port;
    int thread_num;
    // todo 
    //conf_get("../conf/ser.conf",ip,&port,&thread_num);

    



    // tcp连接
    int sockfd = tcp_init(ip,port);
    // 
    

    return 0;
}

